#组合对象
#组合两个图形所以我们必须要两个图形的第三方库
from pyecharts.charts import Bar,Line,Grid
from pyecharts import  options
#封装数据
title = ["今天你绿了吗","python数据挖掘的前景","广西旅行大开发"]
looks = [30000,25000,33000]
likes = [28000,19000,30000]
#创建需要的图形对象
bar = Bar()
line = Line()
#
bar.add_xaxis(title)
bar.add_yaxis("阅读量",looks)
bar.add_yaxis("点赞量",likes)
line.add_xaxis(title)
line.add_yaxis("阅读量",looks)
line.add_yaxis("点赞量",likes)
#创建组合对象
grid = Grid()
#
grid.add(bar,grid_opts=options.GridOpts(pos_bottom="50%"))
grid.add(line,grid_opts=options.GridOpts(pos_top="50%"))
#
grid.render("组合.html")
